# encoding: utf-8

from rest_framework import serializers

from api.conf import USERNAME_MAX_LENGTH, PASSWORD_MAX_LENGTH


class LoginRequestSerializer(serializers.Serializer):
    username = serializers.CharField(max_length=USERNAME_MAX_LENGTH)
    password = serializers.CharField(max_length=PASSWORD_MAX_LENGTH)


class LoginResponseSerializer(serializers.Serializer):
    key = serializers.CharField()


class SmsCodeLoginSerializer(serializers.Serializer):
    phone_number = serializers.CharField(min_length=11, max_length=11)
    sms_code = serializers.CharField(min_length=6, max_length=6)
